<?php
/**
 +------------------------------------------------------------------------------
 * MemberAction控制器类
 +------------------------------------------------------------------------------
 * @category   view
 * @package  index
 * @subpackage  index
 * @author   朝闻道 <hydata@gmail.com>
 * @date  2010-8-22
 * @time  下午01:00:33
 +------------------------------------------------------------------------------
 */
 class MemberAction extends CommonAction {
 	protected $pnum=25;
 	function _initialize() {
 		parent::_initialize();
		if(!$this->user){
			$this->assign("jumpUrl",U("Public/index"));
			$this->error(L('_err_NO_LOGIN_'));
		}
		$this->pnum=empty($_GET['pnum'])?25:$_GET['pnum'];
		$page=array();
		$page['title']="Control Center";
		$page['keywords']="";
		$page['description']='';
		$page['expires']='';
		$this->assign("page",$page);
	}//end _initialize
	
	/**
	 * @用户控制面板
	 * @author   朝闻道 <hydata@gmail.com>
	 * @date:  2010-8-22 / time:  下午01:14:01
	 +------------------------------------------------------------------------------
	 */
	function index() {
		//index_用户控制面板
		$this->display();
	}//end index_用户控制面板
	
	/**
	   *更新激活时间为现在
	   *@date 2010-12-8 / @time 下午03:07:35
	   */
	function update_action() {
		//更新激活时间为现在
		$aid=Input::getVar($_GET['aid']);
	}//end update_action
	
	/**
	   *深度链接
	   *@date 2010-11-25
	   *@time 下午04:42:14
	   */
	function deep() {
		//深度链接
		$aid=Input::getVar($_GET['aid']);
		$dao=D("Deep");
		$condition=array('aid'=>$aid,'dlang'=>$this->lang);
		$data=array();
		$count=$dao->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$data=$dao->where($condition)->limit($limit)->findAll();
		$this->assign("data",$data);
		$this->assign("aid",$aid);
		$this->display();
	}//end deep
	
	/**
	   *添加深度链接
	   *@date 2010-11-25 / @time 下午04:44:29
	   */
	function deep_add() {
		//添加深度链接
		$id=Input::getVar($_GET['id']);
		$aid=Input::getVar($_GET['aid']);
		if ($id){
			$dao=D("Deep");
			$condition=array('id'=>$id);
			$vo=array();
			$vo=$dao->where($condition)->find();
			if($vo){
				$this->assign("vo",$vo);
			}else{
				$this->error(L("_err_deep_null_"));
			}
			$this->assign("aid",$vo['aid']);
			$this->assign("act",'update');
		}else{
			$this->assign("aid",$aid);
			$this->assign("act",'add');
		}
		$this->display();
	}//end deep_add
	
	/**
	   *处理深度链接
	   *@date 2010-11-29 / @time 上午10:08:55
	   */
	function deep_chk() {
		//处理深度链接
		$act=Input::getVar($_POST['act']);
		$dao=D("Deep");
		if ($act=='add'){
			$vo=$dao->create();
			$id=$dao->add($vo);
			if($id){
				$this->assign("jumpUrl",ru("/Member/deep",array("aid"=>$_POST['aid'])));
				$this->success(L("_deep_add_ok_"));
			}else{
				$this->assign("jumpUrl",ru("/Member/deep_add",array("aid"=>$_POST['aid'])));
				$this->success(L("_deep_add_bad_"));
			}
		}elseif($act=='update'){
			$vo=$dao->create();
			$condition=array("id"=>Input::getVar($_POST['id']),"aid"=>Input::getVar($_POST['aid']));
			$dao->where($condition)->save($vo);
			$this->assign("jumpUrl",ru("Member/deep",array("aid"=>$_POST['aid'])));
			$this->success(L("_deep_update_ok_"));
		}else{
			$this->success(L("_err_id_null_"));
		}
	}//end deep_chk
	
	/**
	   *删除深度链接
	   *@date 2010-12-8 / @time 下午02:28:17
	   */
	function deep_delete() {
		//删除深度链接
		$id=Input::getVar($_GET['id']);
		$aid=Input::getVar($_GET['aid']);
		if ($id){
			$dao=D("Deep");
			$condition=array("id"=>$id);
			$dao->where($condition)->limit("1")->delete();
			$this->assign("jumpUrl",ru("Member/deep",array("aid"=>$aid)));
			$this->success(L("_deep_delete_ok_"));
		}else{
			$this->success(L("_err_id_null_"));
		}
	}//end deep_delete
	
	/**
	   *站点管理
	   *@date 2010-12-7 / @time 下午04:59:00
	   */
	function site() {
		//站点管理
		$arc=D("Arc");
		$uid=$this->user['id'];
		$condition=array();
		$condition['_string']="FIND_IN_SET('".$uid."',`master`) > 0 ";
		$site=array();
		$count=$arc->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$site=$arc->where($condition)->limit($limit)->findAll();
		$this->assign("site",$site);
		$this->display();
	}//end site
	
	/**
	   *添加站点
	   *@date 2010-12-23 / @time 下午01:50:57
	   */
	function site_add() {
		//添加站点
		if($_GET['act']=='edit'){
			$id=Input::getVar($_GET['id']);
			$arc=D("Arc");
			$info=$arc->where("id=$id")->find();
			$this->assign("info",$info);
		}
		$this->assign('plang',$this->plang);
		$act=Input::getVar($_GET['act']);
		$this->assign('act',$act);
		$dao=D("Cat");
		$data=$dao->where("is_show=1")->findAll();
		$data=list_to_tree($data,'id','pid','_son',0);
		$this->assign('cat_list',$data);
		$this->display();
	}//end site_add
	
	/**
	   *处理站点
	   *@date 2010-12-23 / @time 下午02:53:41
	   */
	function site_chk() {
		//处理站点
		$arc=D("Arc");
		if(empty($_POST['server'])&&$_POST['vip']==1){
			$this->error(L('_err_not_select_server_'));
		}
		$vo=$arc->create();
		$vo['vipreg']=time();
		$vo['is_show']=0;
		$vo['olang']='';
		if($_POST['vip']==1){
			$vo['server']=array2string($_POST['server'],',');
		}
		$vo['master']=$this->user['id'];
		$id=$arc->add($vo);
		if($id){
			$this->assign("jumpUrl",ru("Member/site_lang"));
			$this->success(L('_suc_create_ok_'));
		}else{
			$this->error(L('_err_main_table_'));
		}

	}//end site_chk
	
	/**
	   *站点英文信息
	   *@date 2010-12-23 / @time 下午02:58:25
	   */
	function site_lang() {
		//站点英文信息
		$lang=Input::getVar($_GET['lang']);
		$aid=Input::getVar($_GET['aid']);
		if ($lang&&$aid){
			$condition=array();
			$condition['aid']=$aid;
			$condition['lang']=$lang;
			$arc_lang=D("ArcLang");
			$info=$arc_lang->where($condition)->find();
			//dump($arc_lang->getlastsql());
			if ($info) {
				$this->assign('info',$info);
				$this->assign("act",'edit');
			}else{
				$this->assign("act",'inster');
			}
		}else{
			$this->assign("act",'inster');
		}
		$this->assign("aid",$aid);
		$this->display();
	}//end site_en
	
	/**
	   *站点语言完善
	   *@date 2010-12-23 / @time 下午02:59:07
	   */
	function site_lang_chk() {
		//站点语言完善
		$act=Input::getVar($_POST['act']);
		$aid=Input::getVar($_POST['aid']);
		if($aid){
			$uid=$this->user['id'];
			$arc=D("arc");
			$condition=array();
			$condition['id']=$aid;
			$condition['_string']="FIND_IN_SET('".$uid."',`master`) > 0 ";
			$info=$arc->where($condition)->find();
		}else{
			$this->success(L("_err_id_null_"));
		}
		$arc_lang=D("ArcLang");
		if ($act=='inster') {
			$vo=$arc_lang->create();
			$lang_id=$arc_lang->add($vo);
			if ($lang_id) {
				$this->assign("jumpUrl",ru("Member/site"));
				$this->success(L("_site_lang_inster_ok_"));
			}else{
				$this->success(L("_site_lang_bad_"));
			}
		}else{
			$vo=$arc_lang->create();
			$arc_lang->save($vo);
			$this->assign("jumpUrl",ru("Member/site"));
			$this->success(L("_site_lang_update_ok_"));
		}
	}//end site_lang_chk
		/**
	   *资讯
	   *@date 2010-11-25
	   *@time 下午04:42:14
	   */
	function news() {
		//资讯
		$aid=Input::getVar($_GET['aid']);
		$dao=D("News");
		$condition=array('aid'=>$aid,'nlang'=>$this->lang);
		$data=array();
		$count=$dao->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$data=$dao->where($condition)->limit($limit)->findAll();
		//dump($dao->getLastSql());
		$this->assign("data",$data);
		$this->assign("aid",$aid);
		$this->display();
	}//end news
	
	/**
	   *添加资讯
	   *@date 2010-11-25 / @time 下午04:44:29
	   */
	function news_add() {
		//添加资讯
		$id=Input::getVar($_GET['id']);
		$aid=Input::getVar($_GET['aid']);
		if ($id){
			$dao=D("News");
			$condition=array('id'=>$id);
			$vo=array();
			$vo=$dao->where($condition)->find();
			if($vo){
				dump($vo);
				$this->assign("vo",$vo);
			}else{
				$this->error(L("_err_news_null_"));
			}
			$this->assign("aid",$vo['aid']);
			$this->assign("act",'edit');
		}else{
			$this->assign("aid",$aid);
			$this->assign("act",'inster');
		}
		$this->display();
	}//end news_add
	
	/**
	   *处理资讯
	   *@date 2010-11-29 / @time 上午10:08:55
	   */
	function news_chk() {
		//处理资讯
		$act=Input::getVar($_POST['act']);
		$dao=D("News");
		if ($act=='inster'){
			$vo=$dao->create();
			$id=$dao->add($vo);
			if($id){
				$this->assign("jumpUrl",ru("/Member/news",array("aid"=>$id)));
				$this->success(L("_news_add_ok_"));
			}else{
				$this->assign("jumpUrl",ru("/Member/news_add",array("aid"=>$id)));
				$this->success(L("_news_add_bad_"));
			}
		}elseif($act=='edit'){
			$vo=$dao->create();
			$condition=array("id"=>Input::getVar($_POST['id']),"aid"=>Input::getVar($_POST['aid']));
			$dao->where($condition)->save($vo);
			$this->assign("jumpUrl",ru("Member/news",array("aid"=>$_POST['aid'])));
			$this->success(L("_news_update_ok_"));
		}else{
			$this->success(L("_err_id_null_"));
		}
	}//end news_chk
	
	/**
	   *删除资讯
	   *@date 2010-12-8 / @time 下午02:28:17
	   */
	function news_delete() {
		//删除资讯
		$id=Input::getVar($_GET['id']);
		$aid=Input::getVar($_GET['aid']);
		if ($id){
			$dao=D("News");
			$condition=array("id"=>$id);
			$dao->where($condition)->limit("1")->delete();
			$this->assign("jumpUrl",ru("Member/news",array("aid"=>$aid)));
			$this->success(L("_news_delete_ok_"));
		}else{
			$this->success(L("_err_id_null_"));
		}
	}//end news_delete
	
	/**
	   *PM消息操作及列表
	   *@date 2010-12-20 / @time 上午11:16:08
	   */
	function pm() {
		//PM消息操作及列表
		$dao=D("Pm");
		$fromuid=$this->user['id'];
		$condition=array();
		$condition['fromuid']=array("eq",$fromuid);
		$condition['type']=array("in",'0,1');
		$condition['foshow']=array("eq",'1');
		//type 0:用户  1:系统 2:存档 3:删除
		$count=$dao->where($condition)->count();
		$page=new Page($count,$this->pnum);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$data=$dao->where($condition)->limit($limit)->findAll();
		$this->assign("pmlist",$data);
		$this->display();
	}//end pm
	
	/**
	   *发送PM
	   *@date 2010-12-20 / @time 下午04:53:26
	   */
	function pm_add() {
		//发送PM
		$fromuid=empty($_GET['fromuid'])?'':$_GET['fromuid'];
		$this->assign('fromuid',$fromuid);
		$this->display();
	}//end pm_add
	
	/**
	   *短消息发送处理
	   *@date 2010-12-22 / @time 下午02:12:16
	   */
	function pm_chk() {
		//短消息发送处理
		dump($_SESSION[C("TOKEN_NAME")]);
		dump($_POST[C("TOKEN_NAME")]);
		$data=array();
		$data[C("TOKEN_NAME")]=$_POST[C("TOKEN_NAME")];
		$data['type']='0';
		$data['fromuid']=Input::getVar($_POST['fromuid']);
		$data['fromusername']=Input::getVar($_POST['fromusername']);
		$data['title']=Input::getVar($_POST['title']);
		$data['content']=Input::safeHtml($_POST['content']);
		if(empty($data['fromuid'])&&!empty($data['fromusername'])){
			$member=D("Member");
			$condition=array();
			$condition['username']=array("eq",$data['fromusername']);
			$condition['email']=array("eq",$data['fromusername']);
			$condition['_logic']="or";
			$user=$member->where($condition)->find();
			if ($user['id']){
				$data['fromuid']=$user['id'];
			}
		}
		if (empty($data['fromuid'])) {
			$this->error(L("_err_id_null_"));
		}
		if(empty($data['title'])||empty($data['content'])){
			$this->error(L("_err_info_bad_"));//信息不完整
		}
		$data['touid']=$this->user['id'];
		$data['tousername']=$this->user['username'];
		$pm=D("Pm");
		$vo=$pm->create($data);
		if($vo){
			$pmid=$pm->add($vo);
			if($pmid){
				$this->success(L("_suc_pm_ok_"));
			}else{
				$this->error(L("_err_pm_bad_"));
			}
		}else{
			$this->error($pm->getError());
		}
		
	}//end pm_chk
	
	/**
	   *查看短消息
	   *@date 2010-12-23 / @time 上午10:44:24
	   */
	function pm_view() {
		//查看短消息
		$pm=D("Pm");
		$id=Input::getVar($_GET['id']);
		if(empty($id)){
			$this->error(L("_err_id_null_"));
		}
		$condition=array();
		$condition['id']=$id;
		$info=$pm->where($condition)->find();
		if(empty($info)||$info['fromuid']!=$this->user['id']){
			$this->error(L("_err_id_null_"));
		}
		$this->assign("info",$info);
		$this->display();
	}//end pm_view
	
	/**
	   *隐藏Pm
	   *@date 2010-12-23 / @time 上午11:38:12
	   */
	function pm_delete() {
		//隐藏Pm
		$pm=D("Pm");
		$id=Input::getVar($_GET['id']);
		$type=empty($_GET['t'])?'fo':Input::getVar($_GET['t']);
		$type.='show';
		if(empty($id)){
			$this->error(L("_err_id_null_"));
		}
		$condition=array();
		$condition['id']=$id;		
		$info=$pm->where($condition)->find();
		if(empty($info)||$info['fromuid']!=$this->user['id']){
			$this->error(L("_err_id_null_"));
		}
		$pm->where($condition)->setField($type,'0');
		$this->assign("jumpUrl",ru("Member/pm"));
		$this->success(L("_suc_pm_delete_"));
	}//end pm_delete

	
	/**
	   *站点产品
	   *@date 2010-12-27 / @time 上午09:42:27
	   */
	function product() {
		//站点产品
		$aid=Input::getVar($_GET['aid']);
		if ($aid){
			$pro=D("Product");
			$condition=array();
			$condition['aid']=$aid;
			$condition['pis_show']='1';
			$count=$pro->where($condition)->count();
			$page=new Page($count, 25);
			$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
			$this->assign('showpage',$page->show());
			$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
			$this->assign('showpage_bot',$page->show_img());
			$limit=$page->firstRow.','.$page->listRows;
			$list=$pro->where($condition)->limit($limit)->findAll();
			$this->assign("list",$list);
			$this->assign("aid",$aid);
			$this->display();
		}else{
			$this->error(L("_err_id_null_"));
		}
	}//end product
	
	
	/**
	   *添加产品
	   *@date 2010-12-27 / @time 下午02:26:49
	   */
	function product_add() {
		//添加产品
		$aid=Input::getVar($_GET['aid']);
		$id=Input::getVar($_GET['id']);
		if ($id){
			$dao=D("Product");
			$condition=array('id'=>$id);
			$vo=array();
			$vo=$dao->where($condition)->find();
			if($vo){
				$this->assign("vo",$vo);
			}else{
				$this->error(L("_err_product_null_"));
			}
			$this->assign("aid",$vo['aid']);
			$this->assign("act",'edit');
		}else{
			$this->assign("aid",$aid);
			$this->assign("act",'inster');
		}
		$this->display();
	}//end product_add
	
	
	/**
	   *处理产品
	   *@date 2010-12-27 / @time 下午03:12:35
	   */
	function product_chk() {
		//处理产品
		$act=Input::getVar($_POST['act']);
		$dao=D("Product");
		if ($act=='inster'){
			$vo=$dao->create();
			$id=$dao->add($vo);
			if($id){
				$this->assign("jumpUrl",ru("/Member/product",array("aid"=>$id)));
				$this->success(L("_product_add_ok_"));
			}else{
				$this->assign("jumpUrl",ru("/Member/product_add",array("aid"=>$id)));
				$this->success(L("_product_add_bad_"));
			}
		}elseif($act=='edit'){
			$vo=$dao->create();
			$condition=array("id"=>Input::getVar($_POST['id']),"aid"=>Input::getVar($_POST['aid']));
			$dao->where($condition)->save($vo);
			$this->assign("jumpUrl",ru("Member/product",array("aid"=>$_POST['aid'])));
			$this->success(L("_product_update_ok_"));
		}else{
			$this->error(L("_err_id_null_"));
		}
	}//end product_chk
	
	/**
   *删除产品
   *@date 2010-12-28 / @time 下午02:41:17
   */
	function product_delete() {
		//删除产品
		$id=Input::getVar($_GET['id']);
		$aid=Input::getVar($_GET['aid']);
		if ($id){
			$dao=D("Product");
			$condition=array("id"=>$id);
			$dao->where($condition)->limit("1")->delete();
			$this->assign("jumpUrl",ru("Member/product",array("aid"=>$aid)));
			$this->success(L("_product_delete_ok_"));
		}else{
			$this->success(L("_err_id_null_"));
		}
	}//end product_delete
	
		
	/**
	   *广告服务
	   *@date 2010-12-23 / @time 下午04:51:58
	   */
	function promotion() {
		//广告服务
		$this->display();
	}//end promotion
	
	/**
	   *用户收藏夹
	   *@date 2010-12-30 / @time 下午04:54:12
	   */
	function favorite() {
		//用户收藏夹
		$dao=D("Collection");
		$condition=array();
		$condition['uid']=$this->user['id'];
		$condition['listid']=1;
		$condition['is_show']=1;
		$count=$dao->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$list=$dao->where($condition)->limit($limit)->findAll();
		$this->assign("list",$list);
		$this->display();
	}//end favorite
	
	/**
	   *用户关注记录
	   *@date 2010-12-30 / @time 下午04:54:59
	   */
	function focus() {
		//用户关注记录
		$dao=D("Collection");
		$condition=array();
		$condition['uid']=$this->user['id'];
		$condition['listid']=2;
		$condition['is_show']=1;
		$count=$dao->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$list=$dao->where($condition)->limit($limit)->findAll();
		$this->assign("list",$list);
		$this->display();
	}//end focus
	
	/**
	   *用户查看历史记录
	   *@date 2010-12-30 / @time 下午04:55:28
	   */
	function history() {
		//用户查看历史记录
		$dao=D("History");
		$condition=array();
		$condition['uid']=$this->user['id'];
		$count=$dao->where($condition)->count();
		$page=new Page($count, 25);
		$page->config=array('header'=>'Rows','prev'=>'Previous','next'=>'Next','first'=>'«','last'=>'»','theme'=>' %nowPage%/%totalPage% %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end%');
		$this->assign('showpage',$page->show());
		$page->config=array('header'=>'','prev'=>'<','next'=>'>','first'=>'«','last'=>'»','theme'=>'%first% %upPage%  %prePage%  %linkPage%  %nextPage% %downPage% %end%');
		$this->assign('showpage_bot',$page->show_img());
		$limit=$page->firstRow.','.$page->listRows;
		$list=$dao->where($condition)->limit($limit)->findAll();
		$this->assign("list",$list);
		$this->display();
	}//end history
	
}//end class